<%@ include file="/layout/top.jsp" %>
<%@ page import="java.util.List" %>
<%@ page import="post.Utils" %>
<%@ page import="post.Post" %>
<%
    List<Post> posts =  Utils.find();
%>
<% if (posts.isEmpty()) { %>
empty
<% } else { %>
    <% for (Post p:posts) { %>
    <div><a href="/post/view.jsp?id=<%= p.getId() %>"><%= p.getTitle() %></a>  <a href="/post/update.jsp?id=<%= p.getId() %>">Update</a></div>
    <% } %>

<% } %>
<%@ include file="/layout/foot.jsp" %>